package kin.test;

import java.util.ArrayList;
import java.util.List;

public class Child implements Runnable{



private List<ActionListener> actionListeners=new ArrayList<ActionListener>();


public void addActionListener(ActionListener actionListener){
	this.actionListeners.add(actionListener);
}




public void wakeup(){
	
	for(ActionListener actionListener:actionListeners){
		actionListener.feed(new DoEvent(System.currentTimeMillis(), null, this));
	}
}





public void run() {
	try {
		Thread.sleep(5000);
	} catch (InterruptedException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	this.wakeup();
}

public static void main(String[] args) {
	Child c=new Child();
	Parent p=new Parent();
	c.addActionListener(p);
	new Thread(c).start();
	
}

}
